package puzzle.projecteuler.p200;

import puzzle.projecteuler.ContinuedFraction;
import puzzle.projecteuler.QuadricFraction;

public class Problem192C {

	/**
	 * 利用类QuadricFraction，算出sqrt(n)的连分数结果，
	 * 从而获得最接近sqrt(n)的分数；
	 *  
	 * @param args
	 */
	public static void main(String[] args) {
		long s = System.currentTimeMillis();
		QuadricFraction qf = new QuadricFraction(0,1,1,13);
		ContinuedFraction cf = qf.continuedFractionValue();
		for (int i = 1; i < 100; i ++) {
			System.out.println(cf.fractionValue(i));
		}
		System.out.println((System.currentTimeMillis() - s) + " ms");
	}
	
	
}
